<template>
  <div class="panel bar">
    <slot name="chartHeader">
      <h2>{{ title }}</h2>
    </slot>
    <slot name="chartContent">
      图标
    </slot>
    <!--      为伪元素而生      -->
    <div class="panel-footer"></div>
  </div>
</template>

<script setup>
const {title} = defineProps({
  title: {
    type: String,
    default: "可视化-图表面板"
  }
})
</script>

<style scoped lang="less">

// 卡片
.panel {
  height: 4.875rem;
  border: 1px solid rgba(25, 186, 139, .17);
  background: url("../../../assets/images/line(1).png") rgba(255, 255, 255, .04);
  padding: 0 0.1875rem 0.5rem;
  margin-bottom: 0.1875rem;
  position: relative;

  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    border-left: 2px solid #02a6b5;
    border-top: 2px solid #02a6b5;
  }

  &::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-top: 2px solid #02a6b5;
    border-right: 2px solid #02a6b5;
  }

  .panel-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;

    &::before {
      content: "";
      position: absolute;
      bottom: 0;
      left: 0;
      width: 10px;
      height: 10px;
      border-left: 2px solid #02a6b5;
      border-bottom: 2px solid #02a6b5;
    }

    &::after {
      content: "";
      position: absolute;
      bottom: 0;
      right: 0;
      width: 10px;
      height: 10px;
      border-bottom: 2px solid #02a6b5;
      border-right: 2px solid #02a6b5;
    }
  }

  h2 {
    height: 0.6rem;
    color: #fff;
    line-height: .6rem;
    text-align: center;
    font-size: .25rem;
    font-weight: 400;
  }
}
</style>
